<html>

<header>
<link rel="stylesheet" type="text/css"
href="stylesheet.css" />

</header>
<body>

<?

include("./includes/auth.php");
include("./includes/dbconnect.php");

?>


<h1>View node details</h1>

<?
//get search variable

$searchid= $_GET['id'];

?>




<?

//set form variables to current entries in DB

include("./includes/dbconnect.php");

$result = mysql_query("SELECT * FROM nodes WHERE id=$searchid",$link);

if (!$result)
{
       echo "no results ";
}
else
{

//grab data from database
$row = mysql_fetch_array($result);


//start table
echo("<table>");

//output the actual data
echo ("<tr><td>Id</td><td>". $row['id'] . "</td></tr>\n");
echo ("<tr><td>Name</td><td>". $row['name'] . "</td></tr>\n");
echo ("<tr><td>Lat</td><td>". $row['lat'] . "</td></tr>\n");
echo ("<tr><td>Long</td><td>". $row['lon'] . "</td></tr>\n");
echo ("<tr><td>Owner</td><td>". $row['ownerid'] . "</td></tr>\n");
echo ("<tr><td>Status</td><td>". $row['status'] . "</td></tr>\n");
echo ("<tr><td>About</td><td>". $row['about'] . "</td></tr>\n");
echo ("<tr><td>Address</td><td>". $row['address'] . "</td></tr>\n");
echo ("<tr><td>Url</td><td>". $row['url'] . "</td></tr>\n");

//end table
echo("</table>");

}

//close off database connection
mysql_close($link);

?>

<p></p>

<A HREF="javascript:window.close()">Close</A>


</body>
</html>